package com.glory.erp.invoice.bill.action;

import java.util.List;

import com.glory.erp.invoice.bill.service.BillService;
import com.glory.erp.invoice.bill.bean.BillQuery;
import com.glory.erp.invoice.supplier.bean.Supplier;
import com.glory.erp.invoice.supplier.service.SupplierService;
import com.glory.erp.auth.base.BaseAction;

public class BillAction extends BaseAction {
	
	public BillQuery billQuery = new BillQuery();

	private BillService billService;
	private SupplierService supplierService;

	public void setSupplierService(SupplierService supplierService) {
		this.supplierService = supplierService;
	}

	public void setBillService(BillService billService) {
		this.billService = billService;
	}
	
	/**
	 * 
	 * @Description: 采购报表展示
	 * @Title: buyBillList
	 * @Author: 樊双峰
	 * @Param: @return
	 * @return: String
	 * @Date: 2018年6月10日 上午12:19:55
	 * @throws
	 */
	public String buyBillList(){
		// 加载所有供应商信息
		List<Supplier> supplierList = supplierService.findAll();
		put("supplierList", supplierList);
		// 加载报表数据
		List<Object[]> billList = billService.findBuyBill(billQuery);
		put("billList", billList);
		return "buyBillList";
	}
}